<template>
  <div class="sendAccount">
    <myHead title="我的账户" background-color="#262A36"></myHead>
    <div class="accountTop">
      <div class="income">
        <div>我的总收入</div>
        <div>￥<span>888.88</span></div>
      </div>
      <div class="withdraw">提现</div>
    </div>
    <div class="accountCenter">
      <div>
        <div>今日获得</div>
        <div><span>24.88</span>元</div>
      </div>
      <div>
        <div>今日获得</div>
        <div><span>24.88</span>元</div>
      </div>
    </div>
    <div class="gray"></div>
    <div class="tab">
      <div v-for="(x,y) in tab" class="tab_box" @click="isTab(y)">
        <p :class="present == y?'':'selected'">{{x.text}}</p>
        <transition name="el-zoom-in-center">
          <p v-show="present == y"></p>
        </transition>
      </div>
    </div>
    <div class="accountBot">
      <div class="list">
        <div class="left">
          <div class="name">配送费</div>
          <div class="time">2020-05-22 18:90</div>
        </div>
        <div class="right">+0.80</div>
      </div>
    </div>
  </div>
</template>

<script>
  import myHead from "../../components/SendComponents/lib/myHead";

  export default {
    name: "sendAccount",
    components:{
      myHead
    },
    data() {
      return {
        tab: [
          {text: '全部'},
          {text: '配送费'},
          {text: '提现'}
        ],
        present: 0,
      }
    },
    methods: {
      back() {
        this.$router.back();
      },
      isTab(index){
        this.present = index;
      },
    },
    mounted() {

    },
    watch: {

    }
  }
</script>

<style scoped>
  .sendAccount{
    padding-top: .6rem;
  }
  .sendAccount .accountTop{
    width: 3.3rem;
    height: 1.6rem;
    background: url("../../../static/img/send/account_bg.png") no-repeat center center;
    background-size: 100% 100%;
    text-align: center;
    margin: 0 auto;
    color: #ffffff;
  }
  .sendAccount .accountTop .income{
    padding-top: .3rem;
    font-size: .14rem;
    margin-bottom: .1rem;
  }
  .sendAccount .accountTop .income div:nth-child(2){
    font-weight: bold;
    margin-top: .12rem;
  }
  .sendAccount .accountTop .income div:nth-child(2) span{
    font-size: .28rem;
  }
  .sendAccount .accountTop .withdraw{
    margin: 0 auto;
    width: .66rem;
    height: .22rem;
    text-align: center;
    line-height: .22rem;
    border: 1px solid #ffffff;
    color: #ffffff;
    border-radius: .12rem;
  }
  .sendAccount .accountCenter{
    display: flex;
    padding-top: .12rem;
  }
  .sendAccount .accountCenter>div{
    width: 50%;
    text-align: center;
    font-size: .12rem;
    color: #999999;
  }
  .sendAccount .accountCenter>div div:nth-child(2){
    color: #333333;
    font-weight: bold;
    margin-top: .05rem;
  }
  .sendAccount .accountCenter>div div:nth-child(2) span{
    color: #EE3212;
    font-size: .22rem;
  }
  .sendAccount .gray{
    width: 100%;
    height: .08rem;
    background-color: #F5F5F5;
    margin: .2rem 0 0;
  }

  /* 费用分类部分 */
  .tab {
    width: 100%;
    height: 100%;
    max-height: .45rem;
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    /*align-items: center;*/
    background-color: #ffffff;
  }

  .tab_box {
    height: 100%;
    width: calc(100% / 3);
    max-height: .55rem;
    display: flex;
    flex-flow: column;
    justify-content: space-between;
    /*align-items: center;*/
    box-sizing: border-box;
    text-align: center;
  }

  .tab_box > p:nth-child(1) {
    color: #FF750F;
    font-size: .16rem;
    line-height: .16rem;
    padding: .15rem 0 .13rem;
  }

  .tab_box > p:nth-child(2) {
    width: 100%;
    height: .02rem;
    background-color: #FF750F;
    border-radius: .01rem;
  }

  .el-loading-spinner {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    min-height: 5rem;
  }

  .selected {
    color: #333333 !important;
    font-size: .16rem !important;
  }

  .accountList{
    margin-top: .1rem;
    background: #ffffff;
  }

  .sendAccount .list{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .12rem .15rem;
    border-bottom: 1px solid #F0F0F0;
  }
  .sendAccount .list .name{
    font-size: .13rem;
    color: #333333;
    margin-bottom: .03rem;
  }
  .sendAccount .list .time{
    font-size: .11rem;
    color: #999999;
  }
  .sendAccount .list .right{
    font-size: .15rem;
    color: #565656;
  }
  .sendAccount .list .right.red{
    color: #FB4B4B;
  }

</style>
